<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>CSS的学习 | css的学习</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-search/search.css">
        
    
        
        <link rel="stylesheet" href="../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../css/yinyong.html" />
    
    
    <link rel="prev" href="../HTML/HTML文件格式.html" />
    

        
    </head>
    <body>
        
        
    <div class="book"
        data-level="3"
        data-chapter-title="CSS的学习"
        data-filepath="css/CSS的学习.md"
        data-basepath=".."
        data-revision="Mon Jul 23 2018 09:39:03 GMT+0800 (中国标准时间)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        Introduction
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="gitbookInstall.html">
            
                
                    <a href="../gitbookInstall.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        gitbook的安装
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2" data-path="HTML/html.html">
            
                
                    <a href="../HTML/html.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        HTML的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="HTML/HTML文件格式.html">
            
                
                    <a href="../HTML/HTML文件格式.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        HTML的文件声明
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" >
            
            <span><b>2.2.</b> html标签</span>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.2.1" >
            
            <span><b>2.2.1.</b> a标签</span>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="3" data-path="css/CSS的学习.html">
            
                
                    <a href="../css/CSS的学习.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        CSS的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="css/yinyong.html">
            
                
                    <a href="../css/yinyong.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        css引用方式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="css/select.html">
            
                
                    <a href="../css/select.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        css选择符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="css/font.html">
            
                
                    <a href="../css/font.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        css设置字体样式font
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="css/background.html">
            
                
                    <a href="../css/background.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        通过CSS设置背景background
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="css/textalign.html">
            
                
                    <a href="../css/textalign.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        文字对齐方式和光标样式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="css/盒子模型.html">
            
                
                    <a href="../css/盒子模型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        盒子模型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="css/textyichu.html">
            
                
                    <a href="../css/textyichu.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        文字溢出处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="css/position.html">
            
                
                    <a href="../css/position.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        定位position
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="js/00.html">
            
                
                    <a href="../js/00.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        js的学习
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="js/JavaScript简介.html">
            
                
                    <a href="../js/JavaScript简介.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        JavaScript简介
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="js/JavaScript数据类型.html">
            
                
                    <a href="../js/JavaScript数据类型.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        JavaScript数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="js/JavaScript运算符.html">
            
                
                    <a href="../js/JavaScript运算符.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        javascript运算符
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../" >css的学习</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h3 id="css&#x7684;&#x5B66;&#x4E60;">CSS&#x7684;&#x5B66;&#x4E60;</h3>
<h4 id="css&#x7684;&#x5F15;&#x5165;&#x65B9;&#x5F0F;">css&#x7684;&#x5F15;&#x5165;&#x65B9;&#x5F0F;</h4>
<p>1&#x3001;&#x884C;&#x5185;&#x5F15;&#x7528;<br>2&#x3001;&#x9875;&#x5185;&#x5F15;&#x7528;<br>3&#x3001;&#x9875;&#x5916;&#x5F15;&#x7528;<br> &#x4E09;&#x79CD;&#x5F15;&#x7528;&#x65B9;&#x5F0F;&#x7684;&#x4F18;&#x5148;&#x7EA7;&#xFF08;&#x5C31;&#x8FD1;&#x539F;&#x5219;&#xFF09;&#xFF1A;  </p>
<p> &#x884C;&#x5185;&#x5E94;&#x7528;&gt; &#x4E1A;&#x5185;&#x5E94;&#x7528;&gt; &#x9875;&#x5916;&#x5F15;&#x7528;  </p>
<h4 id="css&#x9009;&#x62E9;&#x7B26;">CSS&#x9009;&#x62E9;&#x7B26;</h4>
<p>[1.] &#x5143;&#x7D20;&#x9009;&#x62E9;&#x7B26;&#x6216;&#x5143;&#x7D20;&#x9009;&#x62E9;&#x5668;&#x5C31;&#x662F;&#x76F4;&#x63A5;&#x628A;&#x5143;&#x7D20;&#x540D;&#x5F53;&#x505A;&#x9009;&#x62E9;&#x7B26;&#x6BD4;&#x5982;&#xFF1A;div a p ul &#x7B49;&#xFF1B;</p>
<p>[2.] &#x901A;&#x914D;&#x9009;&#x62E9;&#x7B26;&#xFF0C;&#x7528;*&#x6765;&#x8868;&#x793A;&#xFF0C;&#x4F5C;&#x7528;&#x662F;&#x9009;&#x62E9;&#x5230;&#x6240;&#x6709;&#x7684;&#x5143;&#x7D20;&#xFF1B;</p>
<p>[3.] &#x7C7B;&#x540D;&#x9009;&#x62E9;&#x7B26;&#xFF0C;&#x5728;CSS&#x4E2D;&#x7528;class&#x8868;&#x793A;&#x7C7B;&#xFF0C;&#x7528;.&#x6765;&#x8868;&#x793A;&#x4F8B;&#x5982;&#xFF1A;</p>
<p>&lt; div class=&quot;d1&quot; &gt; </p>
<p>&lt; div &gt;</p>
<p>&#x5982;&#x679C;&#x8981;&#x8BBE;&#x7F6E;div&#x7684;&#x6837;&#x5F0F;&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7528;.{height:200}&#x6765;&#x8868;&#x793A;</p>
<p>[4.] id&#x9009;&#x62E9;&#x5668;&#xFF0C;&#x901A;&#x8FC7;Id&#x6765;&#x9009;&#x62E9;&#x8981;&#x6539;&#x53D8;&#x6837;&#x5F0F;&#xFF0C;&#x683C;&#x5F0F;&#x4E3A;#id&#xFF0C;&#x5982;&#xFF1A;</p>
<p>&lt; a id=&quot;a1&quot; &gt; </p>
<p>&lt; a &gt;</p>
<p>&#x8981;&#x6539;&#x53D8;&#x5C5E;&#x6027;&#x5219;&#x9700;&#x8981;#a1{&#x5C5E;&#x6027;&#xFF1A;&#x5C5E;&#x6027;&#x503C;}</p>
<p>&#x9009;&#x62E9;&#x7B26;&#x7684;&#x4F18;&#x5148;&#x7EA7;&#xFF1A; ID&#x9009;&#x62E9;&#x7B26;&gt; &#x7C7B;&#x540D;&#x9009;&#x62E9;&#x7B26;&gt; &#x5143;&#x7D20;&#x9009;&#x62E9;&#x7B26;  &gt;&#x901A;&#x914D;&#x9009;&#x62E9;&#x7B26;</p>
<h4 id="&#x901A;&#x8FC7;css&#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x6837;&#x5F0F;">&#x901A;&#x8FC7;CSS&#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x6837;&#x5F0F;</h4>
<h5 id="&#x5B57;&#x4F53;&#x6837;&#x5F0F;">&#x5B57;&#x4F53;&#x6837;&#x5F0F;</h5>
<p>[*]    font-size &#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x5927;&#x5C0F;&#xFF0C;&#x50CF;&#x7D20;&#x5355;&#x4F4D;&#x4E0D;&#x53EF;&#x7701;&#x7565;</p>
<p>[*]    font-weight &#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x52A0;&#x7C97;</p>
<pre><code> 100-500  &#x6B63;&#x5E38;&#x5B57;&#x4F53;&#x7C97;&#x7EC6;

 600-900  &#x52A0;&#x7C97;            bold     &#x52A0;&#x7C97;&#xFF0C;&#x7C97;&#x7EC6;&#x4E0E;600-900&#x76F8;&#x540C;
</code></pre><p>[* ]    font-family  &#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x7CFB;&#x5217;&#xFF0C;&#x6BD4;&#x5982;&#x5FAE;&#x8F6F;&#x96C5;&#x9ED1;</p>
<p>[* ]    font-style   &#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x6837;&#x5F0F;&#x5982;</p>
<pre><code>             italic   &#x659C;&#x4F53;
             oblique  &#x659C;&#x4F53;
             inherit  &#x7EE7;&#x627F;
             initial  &#x521D;&#x59CB;&#x503C;
</code></pre><p>[*]        color &#x8BBE;&#x7F6E;&#x5B57;&#x4F53;&#x989C;&#x8272;</p>
<h5 id="&#x901A;&#x8FC7;css&#x8BBE;&#x7F6E;&#x80CC;&#x666F;">&#x901A;&#x8FC7;CSS&#x8BBE;&#x7F6E;&#x80CC;&#x666F;</h5>
<p>background   &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x6216;&#x80CC;&#x666F;&#x989C;&#x8272;</p>
<ul>
<li>background&#x2014;color &#x53EA;&#x80FD;&#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x989C;&#x8272;</li>
<li>background-image &#x53EA;&#x80FD;&#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;</li>
<li>background-size  &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x5927;&#x5C0F;&#xFF0C;&#x5F53;&#x53EA;&#x6709;&#x4E00;&#x4E2A;&#x503C;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x8868;&#x793A;&#x53EA;&#x8BBE;&#x7F6E;&#x4E86;&#x80CC;&#x666F;&#x7684;&#x5BBD;&#x5EA6;&#xFF0C;&#x5F53;&#x8BBE;&#x7F6E;&#x4E24;&#x4E2A;&#x503C;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x5206;&#x522B;&#x8868;&#x793A;&#x56FE;&#x7247;&#x7684;&#x5BBD;&#x5EA6;&#x548C;&#x9AD8;&#x5EA6;</li>
<li>background&#x2014;repeat &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x662F;&#x5426;&#x91CD;&#x590D;&#xFF0C;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#x80CC;&#x666F;&#x91CD;&#x590D;&#xFF0C;&#x8BBE;&#x7F6E;&#x4E3A;no-repeat&#xFF0C;&#x5219;&#x5317;&#x4EAC;&#x4E0D;&#x5728;&#x91CD;&#x590D;&#x51FA;&#x73B0;</li>
<li>auto  &#x6309;&#x56FE;&#x7247;&#x539F;&#x6765;&#x7684;&#x5927;&#x5C0F;&#x663E;&#x793A;</li>
<li>cover &#x586B;&#x5145;&#x6EE1;&#x5143;&#x7D20;&#xFF0C;&#x8D85;&#x51FA;&#x90E8;&#x5206;&#x4F1A;&#x6EA2;&#x51FA;</li>
<li>contain &#x5C06;&#x5BB9;&#x5668;&#x7B49;&#x6BD4;&#x4F8B;&#x7684;&#x7F29;&#x653E;&#x5230;&#x548C;&#x5BBD;&#x5EA6;&#x6216;&#x9AD8;&#x5EA6;&#x76F8;&#x540C;&#x7684;&#x5927;&#x5C0F;&#xFF0C;&#x59CB;&#x7EC8;&#x5305;&#x542B;&#x4E8E;&#x5143;&#x7D20;&#x5185;
*background-position  &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;&#x5B9A;&#x4F4D;</li>
<li>left top &#x5DE6;&#x4E0A;&#x89D2;</li>
<li>right top &#x53F3;&#x4E0A;&#x89D2;</li>
<li>left bottom &#x5DE6;&#x4E0B;&#x89D2;</li>
<li>right bottom &#x53F3;&#x4E0B;&#x89D2;</li>
<li>&#x5177;&#x4F53;&#x7684;&#x6570;&#x503C;&#xFF08;x y&#xFF09;,x&#x8868;&#x793A;&#x4E0E;X&#x8F74;&#x4E0A;&#x7684;&#x504F;&#x79FB;&#x91CF;&#xFF0C;y&#x8868;&#x793A;&#x4E0E;Y&#x8F74;&#x4E0A;&#x7684;&#x504F;&#x79FB;&#x91CF;</li>
<li>background-position-x  &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;X&#x8F74;&#x65B9;&#x5411;&#x7684;&#x504F;&#x79FB;&#x91CF;</li>
<li>background-position-y  &#x8BBE;&#x7F6E;&#x80CC;&#x666F;&#x56FE;&#x7247;y&#x8F74;&#x65B9;&#x5411;&#x7684;&#x504F;&#x79FB;&#x91CF;</li>
</ul>
<h5 id="&#x6587;&#x5B57;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;">&#x6587;&#x5B57;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;</h5>
<ul>
<li>&#x6C34;&#x5E73;&#x5BF9;&#x9F50;&#x65B9;&#x5F0F;    text-align  left &#x5DE6;&#x5BF9;&#x9F50;<pre><code>                  right &#x53F3;&#x5BF9;&#x9F50;
</code></pre></li>
<li>center &#x5C45;&#x4E2D;&#x5BF9;&#x9F50;</li>
<li><p>&#x5782;&#x76F4;&#x5C45;&#x4E2D;      &#x5F53;&#x5143;&#x7D20;&#x5185;&#x53EA;&#x6709;&#x4E00;&#x884C;&#x6587;&#x5B57;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x4F7F;&#x884C;&#x9AD8;line-height &#x4E0E;&#x5BB9;&#x5668;&#x7684;&#x9AD8;&#x5EA6;&#x76F8;&#x7B49;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x6587;&#x5B57;&#x5782;&#x76F4;&#x5C45;&#x4E2D;&#x5728;&#x5BB9;&#x5668;&#x4E2D; </p>
<h5 id="&#x8BBE;&#x7F6E;&#x5149;&#x6807;&#x6837;&#x5F0F;">&#x8BBE;&#x7F6E;&#x5149;&#x6807;&#x6837;&#x5F0F;</h5>
</li>
<li>cursor &#x8BBE;&#x7F6E;&#x5149;&#x6807;&#x683C;&#x5F0F;</li>
<li><p>pointer &#x5C0F;&#x624B;</p>
<p>&#x9009;&#x62E9;&#x7B26;&#xFF1A;{
&#x5C5E;&#x6027; &#xFF1A;&#x5C5E;&#x6027;&#x503C;
}</p>
</li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../HTML/HTML文件格式.html" class="navigation navigation-prev " aria-label="Previous page: HTML的文件声明"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../css/yinyong.html" class="navigation navigation-next " aria-label="Next page: css引用方式"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../gitbook/app.js"></script>

    
    <script src="../gitbook/plugins/gitbook-plugin-search/lunr.min.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-search/search.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-sharing/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"highlight":{},"search":{"maxIndexSize":1000000},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        
    </body>
    
</html>
